package net.cooltain.warhammer.running.window.command;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;

import net.cooltain.warhammer.running.entity.MotionPlayerZone;

public abstract class UserCommandBtn extends JButton {
	
	private static final long serialVersionUID = 4578975480918486221L;
	
	protected MotionPlayerZone player ;

	public UserCommandBtn(String text,MotionPlayerZone player) {
		super(text);
		this.player = player;
		init();
	}
	
	void init(){
		this.addActionListener(new ActionListener(){
			public void actionPerformed(ActionEvent e) {
				command_actionPerformed(e);
			}
		});
	}
	
	protected abstract void command_actionPerformed(ActionEvent e);
}
